package com.hand.qt24953;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

/**
 * @author qiutao
 * @date 2019/7/12
 */
@Aspect
public class SayInterceptor {
    @Pointcut("execution(* com.hand.qt24953.Person.say())")
    private void sayMethod(){}

    @Before("sayMethod()")
    public void doBefore(){
        System.out.println("before:  24953");
    }

    @After("sayMethod()")
    public void doAfter(){
        System.out.println("after:  24953");
    }
}
